// 导入所需的函数
import {
  createRouter,
  createWebHashHistory,
  createWebHistory
} from "vue-router" // 创建路由对象
const router = createRouter({
  // 设置路由模式
  // hash 模式: createWebHashHistory
  // history 模式 : createWebHistory
  history: createWebHashHistory(), // 设置路由规则
  routes: [
    {
      path: "/home",
      component: () => import("../view/Home.vue")
    },
    {
      path: "/",
      redirect: "/home",
      component: () => import("../view/Home.vue")
    },
    {
      path: "/one",
      component: () => import("../view/one/index.vue")
    },
    {
      path: "/two",
      component: () => import("../view/two/index.vue")
    },
    {
      path: "/three",
      component: () => import("../view/three/index.vue")
    },
    {
      path: "/four",
      component: () => import("../view/four/index.vue")
    },
    {
      path: "/ceshi",
      component: () => import("../view/Ceshi/index.vue")
    },
    {
      path: "/ceshi1",
      component: () => import("../view/Ceshi/index1.vue")
    },
    {
      path: "/ceshi2",
      component: () => import("../view/Ceshi/index2.vue")
    },
    {
      path: "/ceshi3",
      component: () => import("../view/Ceshi/index3.vue")
    },
    {
      path: "/lottie",
      component: () => import("../view/Ceshi/lottie.vue")
    },
    {
      path: "/ceshi4",
      component: () => import("../view/Ceshi/index4.vue")
    },
    {
      path: "/ceshi5",
      component: () => import("../view/Ceshi/index5.vue")
    }
  ]
}) // 暴露对象
export default router
